<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>业务功能首页</title>
<link rel="stylesheet" href="<%=path%>/css/bootstrap.min.css" />
<link rel="stylesheet" href="<%=path%>/css/easyui.css" />
<link rel="stylesheet" href="<%=path%>/css/icon.css" />

<style>
body {
	background-color: #f1f1f1;
}

.lightBg {
	background-color: #fff;
	padding: 5px 20px;
}
</style>
</head>
<body>

	<div class="container">
		<div class="row lightBg">
			<!--标题-->
			<h2 class="pull-left">
				<img src="<%=path%>/images/logo.png" style="width: 80px;">
				智游科技项目申报系统
			</h2>
			<p class="pull-right" style="margin-top: 20px;">
				欢迎您，项目负责人 ${user.UName }&nbsp;|&nbsp;<a href="">站内消息(2)</a>&nbsp;<a
					href="<%=path%>/news/toIndex2">退出</a>
			</p>
		</div>
		<div class="row" style="margin-top: 20px;">
			<!--页面一二级菜单部分，公用的-->
			<div class="easyui-tabs" style="">
				<div title="首页" style="padding:10px">首页暂无设计</div>
				<div title="申报管理" style="padding:10px">
					<div class="easyui-panel" style="padding:5px;">
						<a href="<%=path %>/report?uid=${user.UId}"
							class="easyui-linkbutton" data-options="plain:true">填写申请书</a>
					</div>
				</div>
				<div title="项目管理" style="padding:10px">
					<div class="easyui-panel" style="padding:5px;">
						<a href="<%=path%>/toprincipal" class="easyui-linkbutton"
							data-options="plain:true" style="background:  #B0E0E6;">查看项目</a>
					</div>
				</div>
				<div title="拨款管理" style="padding:10px">此功能暂不实现</div>
				<div title="系统管理" style="padding:10px" data-options="plain:true">
					<div class="easyui-panel" style="padding:5px;">
						<a href="<%=path%>/user/my?id=${user.UId}"
							class="easyui-linkbutton" data-options="plain:true">个人信息维护</a> <a
							href="<%=path%>/user/personal?id=${user.UId}"
							class="easyui-linkbutton" data-options="plain:true">个人账号管理</a>
						<!--<a href="#" class="easyui-menubutton" data-options="menu:'#mm2'">单位信息维护</a>-->
					</div>
					<!--
					<div id="mm2" style="width:100px;">
						<div>Help</div>
						<div>Update</div>
						<div>About</div>
					</div>-->
				</div>
			</div>
		</div>

		<!--页面实际数据管理部分-->
		<div class="row" style="margin-top: 20px;">
			<div style="background-color: #fff;padding: 20px;">
				<table id="dg" class="easyui-datagrid" title="以下是你的单位已经成功申报的项目"
					style="height: 500px;"
					data-options="rownumbers:true,singleSelect:true,url:'<%=path %>/OnPass?cid=${user.company.CId }',pagination : true,pageSize : 5,pageList : [ 5, 10, 15 ],fitColumns : true,striped : true,method:'get'"
					toolbar="#tb">
					<thead>
						<tr>
							<th width="90px" data-options="field:'ck',checkbox:true"></th>
							<th width="80px" data-options="field:'pid',align:'center'"
								title="项目编号">项目编号</th>
							<th width="160px" formatter="pname"
								data-options="field:'pname',align:'center'" title="项目名">项目名称</th>
							<th width="120px" data-options="field:'ptype',align:'center'"
								title="项目类型">项目类型</th>
							<th width="160px" formatter="format"
								data-options="field:'company',align:'center'" title="申报单位">申报单位</th>
							<th width="160px" data-options="field:'pcompany',align:'center'"
								title="推荐单位">推荐单位</th>
							<th width="90px" formatter="user"
								data-options="field:'pcontact', align:'center'" title="负责人">负责人</th>
							<th width="90px" data-options="field:'ptime',align:'center'"
								title="提交时间">提交时间</th>

						</tr>
					</thead>
				</table>
				<div id="tb" style="padding:5px;height:auto">
					<div style="margin-bottom:5px">
						<a href="#" class="easyui-linkbutton" iconCls="icon-print"
							plain="true" onclick="doLook()">查看PDF</a>
					</div>
					<div></div>
				</div>
			</div>

			<script src="<%=path%>/js/jquery1.12.4.min.js"></script>
			<script src="<%=path%>/js/bootstrap.min.js"></script>
			<script src="<%=path%>/js/jquery.easyui.min.js"></script>

			<script type="text/javascript">
				$("#seachpro").button().click(function() {
					searchproject();
				});
				function format(value, row, index) {
					return "<a href='<%=path%>/showCom?cid=" + value.cid
						+ "'>" + value.cname + "</a>";
				}
				;
				function doLook() {
					var row = $("#dg").datagrid("getSelected");
					var result = confirm("确定在线浏览PDF吗?")
					window.location.href = "lookFile?pid=" + row.pid + "&isOnLine=" + result;
				}
				function pname(value, row, index) {
					return "<a href='<%=path%>/showProject?PId=" + row.pid
						+ "'>" + value + "</a>";
				}
				;
				function user(value, row, index) {
					return "<a href='<%=path%>/showUser?uname=" + row.pcontact
						+ "'>" + value + "</a>";
				}
				;
			
				$(function() {
			
					$('#dg').datagrid().datagrid({
						pagination : true, //如果为true，则在DataGrid控件底部显示分页工具栏。
						fitColumns : false
					});
					$('.easyui-tabs').tabs('select', '项目管理');
				});
			</script>
</body>
</html>